import time
import json

def get_time():
    localstime = time.localtime()
    tm_year = localstime.tm_year
    tm_mon = localstime.tm_mon
    
    start_date = "{}{}01".format(tm_year, tm_mon-1)
    end_date = time.strftime("%Y%m%d", localstime)
    return (start_date, end_date)

def aa():
    with open("E:\\vscode\gitee\\back_end\\test\\t.json", "r", encoding="utf-8") as f:
        data = json.load(f)
        print(data[0]['t'])
        print(data[0]['o'])
        print(data[0]['h'])
        print(data[0]['l'])
        print(data[0]['c'])
        print(data[0]['v'])
        print(data[0]['a'])
        print(data[0]['pc'])
        return {"日期": data[0]['t'], "开盘价": data[0]['o'], "最高价": data[0]['h'], "最低价": data[0]['l'], "收盘价": data[0]['c'], "成交量": data[0]['v'], "成交额": data[0]['a'], "前收盘价": data[0]['pc']}
    
print(aa())

